package com.bdqn.biz;

import com.bdqn.dao.UserDao;
import com.bdqn.pojo.UserPojo;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.*;
import java.io.IOException;

@WebServlet(name = "exit", value = "/exit")
public class exit extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        //清空session 跳转到登陆页面
        HttpSession session=request.getSession();
        //清空所有的session
       // session.invalidate();
        session.setAttribute("login",null);
        response.sendRedirect("/Web1/login.jsp");
    }
}

